package cn.zl.web.dto.streampush;

import cn.yunbamboos.rest.service.anno.param.ParamType;
import cn.yunbamboos.rest.service.anno.param.enums.Type;
import cn.yunbamboos.rest.service.dto.in.GenericInDTO;
import cn.zl.model.StreamPush;
import com.alibaba.fastjson2.JSONObject;
import jakarta.validation.constraints.NotNull;

public class AddStreamPushInDTO extends GenericInDTO {

    @NotNull(message = "推流信息不能为空")
    @ParamType(path = "stream_push", type = Type.Object)
    private StreamPush streamPush;

    @Override
    public void decode(JSONObject json) {
        super.decode(json);
        this.streamPush = this.getModel(json, "stream_push", StreamPush.class);
    }

    public StreamPush getStreamPush() {
        return streamPush;
    }

}
